from django.db import models

# Create your models here.
class Teacher(models.Model):
    username = models.CharField(max_length=20,unique=True)
    password = models.CharField(max_length=20)
    class Meta:
        db_table = 'teacher'
class Tstu(models.Model):
    name = models.CharField(max_length=20,unique=True)
    age = models.IntegerField()
    teacher = models.ForeignKey(Teacher,on_delete=models.SET_NULL,null=True)
    class Meta:
        db_table = 'tstu'
